﻿<%@ Page Language="C#" MasterPageFile="~/MPage.Master" AutoEventWireup="true" CodeBehind="Register.aspx.cs" Inherits="KTSonline.Register" Title="KTS online - Đăng ký" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="js/reg.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server">
<div id="left">
        <div id="banner">
            <a href="#"><img src="images/banner/banner_top.png" alt="banner" /></a>
        </div>
        <div class="bortop">
        </div>
        <div class="borleft">
            <div class="borright">
                <div class="content">
                    <div class="title">Đăng ký thành viên</div>
                    <div class="padding">
                    <%if (success)
                      { %>
                        <center style="margin:5px">Đăng ký thành viên hoàn tất</center>
                        <center style="margin:5px">Bạn sẽ được chuyển về trang chủ trong <span id="time">5</span> giây</center>
                        <center style="margin:5px">Nếu cảm thấy quá lâu, nhấn vào <a href="Default.aspx">đây</a></center>
                        <script type="text/javascript">
                            var t = 6;
                            setInterval(timecountdown, 1000);
                            function timecountdown()
                            {
                                t--;
                                $('#time').text(t.toString());
                                if(t == 0)
                                    document.location.href = 'default.aspx';
                            }
                        </script>
                    <%}
                      else
                      {%>
                        <div id="reg">
                            <fieldset class="fieldset">
                                <legend class="legend">Thông tin đăng nhập</legend>
                                <ul class="DInfo">
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtUsername" Text="Tên đăng nhập" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtUsername" runat="server" ></asp:TextBox>
                                            <span id="uservalidator" class="error">Vui lòng nhập tên đăng nhập</span>
                                            <img class="hide" src="images/loading.gif" alt="loading" width="22px" height="22px"/>
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtPassword" Text="Mật khẩu" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtPassword" runat="server" name="Password" TextMode="Password"></asp:TextBox>
                                            <span id="passvalidator" class="error">Mật khẩu không được để trống</span>
                                            <img class="hide" src="images/loading.gif" alt="loading" width="22px" height="22px"/>
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtPassConfirm" Text="Nhập lại mật khẩu" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtPassConfirm" runat="server" name="Password" TextMode="Password"></asp:TextBox>
                                            <span id="passconfvalidator" class="error">Vui lòng nhập lại mật khẩu</span>
                                            <img class="hide" src="images/loading.gif" alt="loading" width="22px" height="22px"/>
                                        </p>
                                    </li>
                                </ul>
                            </fieldset>
                            <fieldset class="fieldset">
                                <legend class="legend">Thông tin cá nhân</legend>
                                <ul class="DInfo">
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtName" Text="Họ và tên" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtName" runat="server" name="Name"></asp:TextBox>
                                            <img class="hide" src="images/tick.png" alt="validator"/>
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="ddlSex" Text="Giới tính" runat="server" ></asp:Label>
                                            <asp:DropDownList ID="ddlSex" runat="server">
                                                <asp:ListItem Selected="True" Value="true" Text="Nam"></asp:ListItem>
                                                <asp:ListItem Value="false" Text="Nữ"></asp:ListItem>
                                            </asp:DropDownList>
                                            <img class="hide" src="images/tick.png" alt="validator"/>
                                        </p>
                                    </li>
                                    <li class="phone">
                                        <p>
                                            <asp:Label AssociatedControlId="txtPhone" Text="Điện thoại" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtPhone" runat="server" name="Phone"></asp:TextBox>
                                            <img class="hide" src="images/tick.png" alt="validator"/>
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtEmail" Text="Email" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtEmail" runat="server" name="Email"></asp:TextBox>
                                            <span id="emailvalidator" class="error">Vui lòng nhập email</span>
                                            <img class="hide" src="images/tick.png" alt="validator"/>
                                            
                                        </p>
                                    </li>
                                    <li>
                                        <p>
                                            <asp:Label AssociatedControlId="txtAddress" Text="Địa chỉ" runat="server" ></asp:Label>
                                            <asp:TextBox ID="txtAddress" runat="server" name="Address" TextMode="MultiLine"></asp:TextBox>
                                            <img class="hide" src="images/tick.png" alt="validator"/>
                                        </p>
                                    </li>
                                </ul>
                            </fieldset>
                            <fieldset class="fieldset">
                                <legend class="legend">Mã xác nhận</legend>
                                <recaptcha:RecaptchaControl ID="recaptcha" runat="server" style="margin-left:120px;"
                                    PublicKey="6Lf0A8kSAAAAAGZnlWqiof5c3T36AkGSsDpB2UUo" 
                                    PrivateKey="6Lf0A8kSAAAAAGguEFRNSwrDNobswZKtxCephsd0" Theme="white" Language="en" />

                            </fieldset>
                            <p class="cartbtndone">
                                <asp:Button ID="btndone" class="btndone2" runat="server" Text="Hoàn tất" 
                                    OnClientClick="return validateAll()" OnClick="btndone_Click" /></p>
                        </div>
                        <%} %>
                    </div>
                </div>
            </div>
        </div>
        <div class="borbottom">
        </div>
    </div>
</asp:Content>
